home *** CD-ROM | disk | FTP | other *** search
/ JCSM Shareware Collection 1996 September / JCSM Shareware Collection (JCS Distribution) (September 1996).ISO / tutorial / trac.zip / FIGIII-9.TRA < prev    next >
Text File  |  1990-01-25  |  768b  |  26 lines

  1. 0999          0 Origin
  2.   OP          0
  3.    X          0
  4.    Y          0
  5.    Z          0
  6.               0 Dummy included to reserve read space
  7.  ONE          1 Constant one
  8.          RD  OP Read OP, X, Y
  9.          LD  OP Load OP
  10.          SU ONE Find difference for test
  11.          BN*+4  If < 1 go to halt
  12.          BZ*+8  If = 1 go to add routine
  13.          SU ONE If > 1 see if it is 2
  14.          BZ*+2  If = 2 go to subtract
  15.          HT0000 If not stop
  16.          LD   X Load X
  17.          SU   Y Subtract Y
  18.          ST   Z Store at Z
  19.          BU*+4  Go to print
  20.          LD   X Load X
  21.          AD   Y Add Y
  22.          ST   Z Store at Z
  23.          PC  OP Print
  24.          BU*-16 Go back to start
  25.          EN*-17 End of code with starting location
  26.